package com.lastproject.dto;

import java.io.Serializable;
import java.util.Date;



public class WaitingListDTO implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private int id;
	private int idUser;
	private int idBook;
	private boolean emergency;
	private Date date;
	
	
	
	public WaitingListDTO() {
		super();
	}
	public WaitingListDTO(int id, int idUser, int idBook, boolean emergency,
			Date date) {
		super();
		this.id = id;
		this.idUser = idUser;
		this.idBook = idBook;
		this.emergency = emergency;
		this.date = date;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getIdUser() {
		return idUser;
	}
	public void setIdUser(int idUser) {
		this.idUser = idUser;
	}
	public int getIdBook() {
		return idBook;
	}
	public void setIdBook(int idBook) {
		this.idBook = idBook;
	}
	public boolean isEmergency() {
		return emergency;
	}
	public void setEmergency(boolean emergency) {
		this.emergency = emergency;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + (emergency ? 1231 : 1237);
		result = prime * result + id;
		result = prime * result + idBook;
		result = prime * result + idUser;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		WaitingListDTO other = (WaitingListDTO) obj;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (emergency != other.emergency)
			return false;
		if (id != other.id)
			return false;
		if (idBook != other.idBook)
			return false;
		if (idUser != other.idUser)
			return false;
		return true;
	}
	
	
	
	
}
